It is known for modems to detect various predetermined sequences during secure modem traffic. For example, an escape (hereinafter "ESC") sequence in accordance with the National Security Agency FSVS-210 rev. F pattern, for example, is a unique 128 dibit sequence, each dibit comprising 2 bits which is presented in hex dibits below:
______________________________________ 3332 0010 0120 1101 3210 1121 3110 3322 0130 1021 2311 2331 2031 0232 3212 1111 3330 0020 0300 2203 3020 2303 2221 3310 0320 2103 1223 1323 0122 1131 3030 2223 ______________________________________
This sequence is transmitted by a high speed modem during secure communications to indicate a transition from secure data to signalling data. An ESC detect algorithm requires an exact match of any 12 consecutive dibits to the ideal ESC sequence.
One prior ESC algorithm performs a straight sequence match, that is, it compares the latest 12 dibits of received data to a table containing the ideal ESC sequence. However, this first method requires that the sequence match be performed every dibit; this is an extremely slow method. It also requires that 2 look-up tables be kept; one for 2400/4800 baud rates, and one for 9600 baud rate.
A second algorithm is slightly more complicated, but somewhat faster. It uses the fact that the ESC sequence is a pseudo-random sequence, in which a cluster of 4 consecutive dibits of the sequence is not repeated anywhere else within the sequence. The hex number formed by the 4 dibit cluster is then used as an offset into a table, which contains values indicating the remaining number of dibits in the sequence from each specific 4 dibit cluster. An ESC is determined to be present by 3 consecutively-received clusters having a spacing of 4 between them. However, this second method adds to a cluster each baud (shifts in a dibit), and then performs the table look-up and calculations every fourth baud. Although the every-baud-cluster building process is fast, the code executed every fourth baud is time-consuming and requires two large tables.